const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username, // 建立用户名称的映射  因为我们要做映射，如果初始值为null，一旦引用了getters，就会报错
  userId: state => state.user.userInfo.userId,
  staffPhoto: state => state.user.userInfo.staffPhoto, // 建立用户头像的映射
  routes: state => state.permission.routes // 建立路由权限的映射
}
export default getters
